package com.ruoyi.system.weather_forecast.domain;

import com.google.gson.Gson;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 天气预报包装类
 *
 * @author xuezhenwei
 * @date 2024-06-21 16:17
 */
@Data
public class WeatherForecastWapper implements Serializable {

    private List<Result> results;

    public static WeatherForecastWapper objectFromData(String str) {

        return new Gson().fromJson(str, WeatherForecastWapper.class);
    }

    @Data
    public class Result implements Serializable {
        private Object location;

        private List<WeatherForecast> daily;
    }
}
